package com.hy.controller;

import com.hy.service.CardService;
import com.hy.service.impl.CardServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


public class CardController {
    private CardService cardService = new CardServiceImpl();

    public void selectFollow(HttpServletRequest request, HttpServletResponse response) throws Exception {
        cardService.selectFollow(request,response);
    }

    public void selectCard(HttpServletRequest request, HttpServletResponse response) throws Exception {
        cardService.selectCard(request,response);
    }

    public void selectRecommend(HttpServletRequest request, HttpServletResponse response) throws Exception {
        cardService.selectRecommend(request,response);
    }

    public void selectComment(HttpServletRequest request, HttpServletResponse response) throws Exception {
        cardService.selectComment(request,response);
    }

    //帖子赞同数
    public void queryEndorseCount(HttpServletRequest request, HttpServletResponse response) throws Exception{
        cardService.selectEndorseCount(request,response);
    }

    //赞同
    public void modifyEndorse(HttpServletRequest request, HttpServletResponse response) throws Exception{
        cardService.updateEndorse(request,response);
    }
    //反对修改
    public void modifyOppose(HttpServletRequest request, HttpServletResponse response) throws Exception{
        cardService.updateOppose(request,response);
    }
    //收藏修改
    public void modifyCollect(HttpServletRequest request, HttpServletResponse response) throws Exception{
        cardService.updateCollect(request,response);
    }
    //喜欢修改
    public void modifyLove(HttpServletRequest request, HttpServletResponse response) throws Exception{
        cardService.updateLove(request,response);
    }

    public void queryTableLikeByCardId(HttpServletRequest request, HttpServletResponse response) throws Exception{
        cardService.selectTableLikeByCardId(request,response);
    }

    public void imgUpload(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{
        cardService.imgUpload(request,response);
    }
    public void insertComment(HttpServletRequest request, HttpServletResponse response) throws Exception{
        cardService.insertComment(request,response);
    }
    public void selectCommentCount(HttpServletRequest request, HttpServletResponse response) throws Exception{
        cardService.selectCommentCount(request,response);
    }
}
